﻿<cfsilent>
	<cfscript>
	
		dictAdvice = getProperty("serviceFactory").getBean("senateDictionaryAdvice");
		propAdvice = getProperty("serviceFactory").getBean("studentPropertyAdvice");
		datetimeAdvice = getProperty("serviceFactory").getBean("datetimeAdvice");
		stringAdvice = getProperty("serviceFactory").getBean("stringAdvice");
		markAdvice = getProperty("serviceFactory").getBean("markAdvice");
	
		studentId = event.getArg('STU');

		/* 学校信息 */
		sql = "SELECT sch_name FROM t_school ";
		
		queryObj = new Query( datasource=application.dnsSlave ) ;
		
		rs_school = queryObj.execute( sql=sql ).getResult();
		
		/* 学生信息 */
		sql = "SELECT 
					t.cls_id, t.stu_id,
					t.stu_name, t.stu_name_english, 
					t.stu_sex, t.stu_birthday,
					CASE WHEN t.continent IS NULL THEN '-' ELSE t.continent END continent, 
					T.NATIONALITY, 
					t_idcard_type.idtype_name, t.stu_idcard,
					t_nation.nation_name, t.stu_name_used,
					t.sbj_direction, 
					(SELECT grade FROM (SELECT b.grade FROM i_Stu_Class_Info a 
						INNER JOIN t_class b ON b.cls_id = a.cls_id
						INNER JOIN t_student c ON c.stu_id = a.stu_id 
						WHERE c.stu_id = :studentId ORDER BY b.grade) WHERE ROWNUM = 1) grade_enter 
			   FROM 
					t_student t 
					INNER JOIN t_idcard_type ON t_idcard_type.idtype = t.idtype 
					INNER JOIN t_nation ON t_nation.nation_code = t.nation_code 
			   WHERE 
					t.stu_id = :studentId ";
				
		queryObj = new Query( datasource=application.dnsSlave ) ;
   		queryObj.addParam( name="studentId", value=studentId, cfsqltype="cf_sql_varchar" );
		
		rs_studentEntity = queryObj.execute( sql=sql ).getResult();
		
		
		/* 学生学籍信息 */
		sql = "SELECT  
					t_student_status.student_prop, t_student_status.candidatesno,
					t_student_status.st_id ,
					t_student_status.f_id ,
					t_student_status.date_join, t_student_status.status_code, 
					t_student_status.homeaddr, t_student_status.zipcode, 
					t_student_status.is_married, 
					t_student_status.stu_tel, 
					t_student_status.stu_email, 
					t_student_status.ch_addr, 
					t_student_status.hsk_score,
					t_student_status.pt_date, 
					t_student_status.is_bachelor 
				FROM 
					t_student_status 
				WHERE 
					t_student_status.stu_id = :studentId ";
				
		queryObj = new Query( datasource=application.dnsSlave ) ;
   		queryObj.addParam( name="studentId", value=studentId, cfsqltype="cf_sql_varchar" );
		
		rs_profileEntity = queryObj.execute( sql=sql ).getResult();
		
		/* 学生各项学分统计 */
		sql = "SELECT 
					a.credit, a.credit_req, a.credit_opt, a.credit_phy, a.credit_com, 
					a.credit_failure, 
					a.credit_grad, 
					a.credit_req_avgpt, 
					a.credit_avgpt, 
					a.credit_grad_avgpt 
					FROM t_student_profile a 
					WHERE 
						a.stu_id = :studentId ";
		
		queryObj = new Query( datasource=application.dnsSlave );
		queryObj.addParam( name="studentId", value=studentId, cfsqltype="cf_sql_varchar" );

		rs_summary = queryObj.execute( sql=sql ).getResult();
		

		/* 计划课程 */
		sql = "SELECT 
				t_student_mark.cid ,
				t_term.term_id, t_term.academic_year, t_term.academic_term, 
				t_course.cid, t_course.course_code, t_course.course_name, t_student_mark.credit course_credit, 
				t_student_mark.retaking, t_student_mark.mark_mode, t_student_mark.mark_result, t_student_mark.mark_note, 
				t_student_mark.mark_resit, t_student_mark.mark_renote, t_student_mark.mark_resit_limit, t_student_mark.credit, 
				t_student_mark.credit_point,t_student_mark.credit_point_o, t_student_mark.credit,
				t_course_prop.prop_id, t_course_prop.prop_name 
				FROM t_student_mark 
				INNER JOIN t_term ON t_term.term_id = t_student_mark.term_id 
				INNER JOIN t_course ON t_course.cid = t_student_mark.cid 
				INNER JOIN t_course_prop ON t_course_prop.prop_id = t_student_mark.prop_id 
				WHERE 
					t_student_mark.stu_id = :studentId 
					AND 
					t_student_mark.task_type = 'P' 
				ORDER BY 
					t_term.academic_year DESC, t_term.academic_term, t_course_prop.prop_id, t_course.course_name";
		
		queryObj = new Query( datasource=application.dnsSlave );
		queryObj.addParam( name="studentId", value=studentId, cfsqltype="cf_sql_varchar" );
		
		rs_plan = queryObj.execute( sql=sql ).getResult();
		
		/* 全校通选 */
		sql = "SELECT 
				t_term.term_id, t_term.academic_year, t_term.academic_term, 
				t_course.cid, t_course.course_code, t_course.course_name, t_course.course_credit, 
				t_student_mark.retaking, t_student_mark.mark_mode, t_student_mark.mark_result, t_student_mark.mark_note, 
				t_student_mark.mark_resit, t_student_mark.mark_renote, t_student_mark.mark_resit_limit, 
				t_course_prop.prop_id, t_course_prop.prop_name 
				FROM t_student_mark 
				INNER JOIN t_term ON t_term.term_id = t_student_mark.term_id 
				INNER JOIN t_course ON t_course.cid = t_student_mark.cid 
				INNER JOIN t_course_prop ON t_course_prop.prop_id = t_student_mark.prop_id 
				WHERE 
					stu_id = :studentId 
					AND 
					task_type = 'C' 
				ORDER BY 
					t_term.academic_year, t_term.academic_term, t_course_prop.prop_id, t_course.course_name";
		
		queryObj = new Query( datasource=application.dnsSlave );
		queryObj.addParam( name="studentId", value=studentId, cfsqltype="cf_sql_varchar" );
		
		rs_common = queryObj.execute( sql=sql ).getResult();
		
		
		termYearArray = [];
		termArray = [];
		
		if ( rs_plan.recordCount ) { 
			
			for( j=1; j LTE rs_plan.recordCount; j++ ){
				termYear = [ rs_plan["academic_year"][j], 0 ];
				if ( not arrayFind( termYearArray, termYear ) ) {
					arrayAppend( termYearArray, termYear );
				}
			}

			i=0; 
			for ( termYear in termYearArray ) {
				i++;
				for( j=1; j LTE rs_plan.recordCount; j++ ){
					if ( rs_plan["academic_year"][j] eq termYear[1] ) {

						termYear[2] ++;
						termYearArray[i] = termYear;

					}
				}
			}

			for( j=1; j LTE rs_plan.recordCount; j++ ){
				term = [ rs_plan["academic_year"][j], rs_plan["academic_term"][j], 0, rs_plan["term_id"][j] ];
				if ( not arrayFind( termArray, term ) ) {
					arrayAppend( termArray, term );
				}
			}

			i=0;
			for ( term in termArray ) {
				i++;
				for( j=1; j LTE rs_plan.recordCount; j++ ){
					if ( rs_plan["academic_year"][j] eq term[1] and rs_plan["academic_term"][j] eq term[2] ) {
						term[3] = term[3] + 1;
						termArray[i] = term;
					}
				}
			}
			
		}
		
		
		
		rs_st = queryNew("st_name");
		rs_f = queryNew("f_name");
		
		/*学生类型*/
		if( rs_profileEntity.st_id neq "" ){
			
			sql = "SELECT to_char(i_code_Info.name) st_name from i_code_info where code_Id = :codeId";
			
			queryObj = new Query( datasource=application.dnsSlave ) ;
			
			queryObj.addParam( name="codeId", value=rs_profileEntity.st_id, cfsqltype="cf_sql_varchar" );
		
			rs_st = queryObj.execute( sql=sql ).getResult();
				
		}
		
		/*经费来源*/
		
		if( rs_profileEntity.f_id neq "" ){
			
			sql = "SELECT to_char(i_code_Info.name) f_name from i_code_info where code_Id = :codeId";
			
			queryObj = new Query( datasource=application.dnsSlave ) ;
			
			queryObj.addParam( name="codeId", value=rs_profileEntity.f_id, cfsqltype="cf_sql_varchar" );
		
			rs_f = queryObj.execute( sql=sql ).getResult();
				
		}

		/* 学生当前所在行政班 */
		sql = "SELECT grade, cls_found, cls_name FROM t_class WHERE cls_id = :classId ";
				
		queryObj = new Query( datasource=application.dnsSlave ) ;
   		queryObj.addParam( name="classId", value=rs_studentEntity.cls_id, cfsqltype="cf_sql_char" );
		
		rs_classEntity = queryObj.execute( sql=sql ).getResult();
		
		
		/*学生所有行政班*/
		sql = "SELECT b.cls_name, b.grade FROM i_stu_class_info a INNER JOIN t_class b on b.cls_id = a.cls_id WHERE a.stu_id = :studentId ORDER BY b.grade";
				
		queryObj = new Query( datasource=application.dnsSlave ) ;
		
   		queryObj.addParam( name="studentId", value=studentId, cfsqltype="cf_sql_varchar" );
		
		classArray = queryObj.execute( sql=sql ).getResult();
		
		
		/* 班级归属专业 */
		sql = "SELECT 
					t_subject.sbj_id, t_institute.institute_name,
					t_subject.sbj_name, t_subject.level_code,
					t_subject.schooling_length 
				FROM 
					t_class 
					INNER JOIN t_subject ON t_subject.sbj_id = t_class.sbj_id 
					INNER JOIN t_institute ON t_institute.institute_id = t_subject.institute_id 
				WHERE
					t_class.cls_id = :classId  ";
					
		queryObj = new Query( datasource=application.dnsSlave ) ;
   		queryObj.addParam( name="classId", value=rs_studentEntity.cls_id, cfsqltype="cf_sql_char" );
		
		rs_subjectEntity = queryObj.execute( sql=sql ).getResult();
		
		
		/*学生信息修改记录*/
		sql = "SELECT log_id, t.type_id, 
					 t.user_id, t.log_content, 
					 t.log_ip, t.log_time, t.target_id, 
					 b.user_name   
			   FROM T_LOGINFO t 
				   INNER JOIN t_user b ON b.user_id = t.user_id 
			   WHERE t.type_id = '5'
			   		AND 
					t.target_id = :studentId 
			   ORDER BY t.log_id DESC ";
			 
		 queryObj = new Query( datasource=application.dnsSlave, maxRows=20 );
		 queryObj.addParam( name="studentId", value=studentId, cfsqltype="cf_sql_varchar" );
		 
		 rs_login = queryObj.execute( sql=sql ).getResult();
		 
		 /* 学籍异动记录 */
		sql = "SELECT 
					t_stuchange.stuchg_id, t_stuchange_type.sct_name, 
					t_student.stu_id, t_student.stu_name, 
					t_stuchange.op_description, t_stuchange.change_date, 
					t_student_status.student_prop 
				FROM 
					t_stuchange 
					INNER JOIN t_student ON t_student.stu_id = t_stuchange.stu_id 
					INNER JOIN t_student_status ON t_student.stu_id = t_student_status.stu_id  
					INNER JOIN t_stuchange_type ON t_stuchange_type.sct_code = t_stuchange.sct_code 
				WHERE 
					t_student.stu_id = :studentId 
				ORDER BY 
					t_stuchange.stuchg_id DESC ";
				
		queryObj = new Query( datasource=application.dnsSlave ) ;
   		queryObj.addParam( name="studentId", value=studentId, cfsqltype="cf_sql_varchar" );
		
		rs_history = queryObj.execute( sql=sql ).getResult();
		
		/* 学分指导教师变更记录*/
		sql = "SELECT t.log_id, t.type_id, t.user_id,t.target_id,
					 t.user_id, t.log_content, 
					 t.log_ip, t.log_time, t.target_id, t.cls_id, 
					 b.user_name targetName, a.user_name userName  
			   FROM T_LOGINFO t 
				   INNER JOIN t_user b ON b.user_id = t.target_id 
				   INNER JOIN t_user a ON a.user_id = t.user_id  
			   WHERE type_id = '7' 
			   AND t.target_id = :studentId 
			   ORDER BY t.log_id DESC ";
			 
		 queryObj = new Query( datasource=application.dnsSlave );
		 queryObj.addParam( name="studentId", value=studentId, cfsqltype="cf_sql_varchar");
		 
		 rs_teacherLog = queryObj.execute( sql=sql ).getResult();

		
		event.setArg("pageTitle", "教学运行基础数据 - 学生学籍 - 个人学籍档案 - " & rs_studentEntity.stu_name);
		
		propAdvice.parseProperty( rs_profileEntity.student_prop );

		targetArgs = structNew();
		
		structInsert(targetArgs, "TCHID", event.getArg("tchId"), true);
		
		
		passArgs = structNew();
		structInsert(passArgs, "STU", studentId);
		
		currentTab = event.getArg("TabID", "labBasic");
		
		/*******************************
		
			以下为学生毕业汇总信息
		
		*******************************/
		
		/*学生信息*/
		 sql = "SELECT a.stu_id,a.stu_name,a.stu_name_english,a.stu_sex, a.nationality,a.STU_BIRTHDAY, 
				   b.hsk_score, b.date_join,b.stu_id, b.st_id, c.name  
				 FROM t_student a 
				 INNER JOIN t_student_status b ON b.stu_id = a.stu_id 
				 INNER JOIN i_code_info c ON c.code_id = b.st_id 
				 WHERE a.stu_id = :studentId";
		 
		 queryObj = new Query( datasource=application.dnsSlave );
		 
		 queryObj.addParam( name="studentId", value=studentId, cfsqltype="cf_sql_varchar" );
 
		 rs_student = queryObj.execute( sql=sql ).getResult();
		 
		 
		 dateJoin = "";
	 
		 tipDate = "";
		 
		 /*如果没有入学时间，那么把入学时间设为第一个班级的时间*/	
		 
		 dateJoinContent = rs_student.date_join;
		 
		 if( rs_student.date_join eq ''){
			 
			 sql = "select grade from (select grade from t_class where cls_id in (select cls_id from i_stu_class_info a where a.stu_id = :studentId ) order by grade ) where rownum = 1";	
			 queryObj = new Query( datasource=application.dnsSlave );
		 
			 queryObj.addParam( name="studentId", value=studentId, cfsqltype="cf_sql_varchar" );
	 
			 rs_class = queryObj.execute( sql=sql ).getResult();
			 
			 if( rs_class.recordCount gt 0){
				 
				 if( right(rs_class.grade,1) eq '1' ){
					 dateJoin = left(rs_class.grade,4) & "0901";
					 dateJoinContent = left(rs_class.grade,4) & "-09-01";
				 }else{
					 dateJoin = (left(rs_class.grade,4)+1) & "0301";
					 dateJoinContent = left(rs_class.grade,4) & "-03-01";
				 }
				 
				 tipDate = dateJoin;
			 }
 
			 
		 }else{
			 dateJoin = replace(rs_student.date_join,'-','','ALL');
			 dateJoin = replace(dateJoin,',','','ALL');
			 dateJoin = replace(dateJoin,'.','','ALL');
		 }
		 
		 stuYear = "0";
	 
		 /*根据入学时间判断学生类型和免修课程*/
		 if( left(dateJoin,6) < 200808 ){
			 stuYear = "2005";	
		 }else if( left(dateJoin,6) < 201208 ){
			 stuYear = "2008";	
		 }else if( left(dateJoin,6) < 201308 ){
			 stuYear = "2012";	
		 }else if( left(dateJoin,6) >= 201308 ){
			 stuYear = "2013";	
		 }	
		 
		 /*成绩信息*/
		 sql = "SELECT 
					 a.mark_mode,a.mark_result,a.mark_note,a.mark_resit,a.mark_renote,a.mark_resit_limit,
					 a.credit, a.credit_point, a.credit_point_o, a.exam_module, a.cid , 
					 a.prop_id,a.term_id, 
					 b.course_code,b.course_name,
					 (SELECT t.name FROM t_course_type s INNER JOIN t_course_type_dict t ON t.id = s.course_dict
					  WHERE (s.course_code = b.course_code OR b.course_name like s.course_name || '%' ) AND s.year = :year AND rownum=1
					 ) course_type ,
					 (SELECT t.rank FROM t_course_type s INNER JOIN t_course_type_dict t ON t.id = s.course_dict
					  WHERE (s.course_code = b.course_code OR b.course_name like s.course_name || '%' ) AND s.year = :year AND rownum=1
					 ) course_rank 
				  FROM t_student_mark a 
				  INNER JOIN t_course b ON b.cid = a.cid 
				  WHERE a.stu_id = :studentId 
				  ORDER BY prop_id, course_rank,  course_code ";
				  
		 queryObj = new Query( datasource=application.dnsSlave );
		 
		 queryObj.addParam( name="studentId", value=studentId, cfsqltype="cf_sql_varchar" );
		 queryObj.addParam( name="year", value=stuYear, cfsqltype="cf_sql_char" );
 
		 rs_studentMark = queryObj.execute( sql=sql ).getResult();
		 
		 cids = "";
		 courseNames = "";
		 
		 for( i=1; i LE rs_studentMark.recordCount ;i++){
			 
			 if( rs_studentMark["credit"][i] neq '0'){
				 
				 cids = cids & rs_studentMark["cid"][i] & ",";
				 courseNames = courseNames & rs_studentMark["course_name"][i] & ",";
				 
			 }
			 
		 }
		 
			 
		 yearTerm = left(dateJoin,6);
		 
		 yearMouth = "";
		 
		 if(yearTerm lt 200808){
			 yearMouth = '200508';
		 }else if(yearTerm lt 201208){
			 yearMouth = '200808';
		 }else if(yearTerm lt 201308){
			 yearMouth = '201208';
		 }else{
			 yearMouth = '201308';
		 }
		 
		 /*HSK免修成绩信息*/
		 sql = "SELECT a.course_name, a.course_code, a.cid, a.credit, a.course_credit, b.prop_id ,  
					 (SELECT t.name FROM t_course_type s INNER JOIN t_course_type_dict t ON t.id = s.course_dict
					  WHERE (s.course_code = a.course_code or b.course_name like s.course_name || '%') AND s.year = :year and rownum=1 
					 ) course_type ,
					 (SELECT t.rank FROM t_course_type s INNER JOIN t_course_type_dict t ON t.id = s.course_dict
					  WHERE (s.course_code = b.course_code OR b.course_name like s.course_name || '%' ) AND s.year = :year AND rownum=1
					 ) course_rank 
			    FROM t_hsk_course a 
			    INNER JOIN t_course b ON b.cid = a.cid 
			    WHERE a.hsk = :hskScore 
					AND 
					a.year_term = :yearMouth 
					AND a.course_name NOT IN (:names) 
					AND a.cid NOT IN (:cids) 
			    ORDER BY 
				    a.course_name";
		 
		 queryObj = new Query( datasource=application.dnsSlave );
		 
		 queryObj.addParam( name="hskScore", value=rs_student.hsk_score, cfsqltype="cf_sql_varchar" );
		 queryObj.addParam( name="yearMouth", value=yearMouth, cfsqltype="cf_sql_varchar" );
		 queryObj.addParam( name="names", value=courseNames, cfsqltype="cf_sql_varchar", list=true );
		 queryObj.addParam( name="cids", value=cids, cfsqltype="cf_sql_varchar", list=true );
		 queryObj.addParam( name="year", value=stuYear, cfsqltype="cf_sql_char");
		 
		 rs_hskMark = queryObj.execute( sql=sql ).getResult();
		 
		 
		 /*学年类别信息*/
		 sql = "SELECT t.name,t.rank 
				 FROM t_course_type s 
				 INNER JOIN t_course_type_dict t ON t.id = s.course_dict
				 WHERE s.year = :year 
				 group by t.name,t.rank  
			    ORDER BY 
				    t.rank";
		 
		 queryObj = new Query( datasource=application.dnsSlave );
		 
		 queryObj.addParam( name="year", value=stuYear, cfsqltype="cf_sql_char");
		 
		 rs_courseType = queryObj.execute( sql=sql ).getResult();
		 
		 
		 
		 courseCredit = 0; //总学分
		 courseMust = 0; //必修课学分
		 courseSelect = 0; //选修课学分
		 
		 hasPrictice = "无";//是否有实习课程
		 hasPaper = "无"; //是否有学士学位论文课程
		 
		 creditPoint_t = 0;  //课程学分绩点
		 creditAvgpt = 0; //平均学分绩点
		 
		 courseTypeTable = arrayNew(2);
		 
		 /*初始化课程类别学分*/
		 for( j=1; j le rs_courseType.recordCount; j++ ){
			 for( m=1;m<=2;m++){
				 courseTypeTable[j][m] = 0;
			 }
		 }
		 
		 /*学分统计*/
		 for( i=1; i LE rs_studentMark.recordCount ;i++){
			 
			 credit = rs_studentMark["credit"][i];
			 
			 /*对‘汉语阅读’按年级进行单独计算学分*/
			 
			 if( credit neq 0 ){
				 
				  /*又松大学一律按2004级计划*/
				 if( (stuYear eq '2008' and rs_student.st_id neq '83' )or stuYear eq '2012' ){
					 if( (rs_studentMark["course_name"][i] eq '汉语阅读-1') or (rs_studentMark["course_name"][i] eq '汉语阅读-2') or (rs_studentMark["course_name"][i] eq '汉语阅读-3')){
						 credit = 4;
					 }
				 }else{
					 if( rs_studentMark["course_name"][i] eq '汉语阅读-1' ){
						 credit = 3;
					 }else if( (rs_studentMark["course_name"][i] eq '汉语阅读-2') OR (rs_studentMark["course_name"][i] eq '汉语阅读-3')){
						 credit = 2;
					 }
				 }
				 
			 }
				 
			 
			 courseCredit = courseCredit + credit;
			 
			 creditPoint_t = creditPoint_t + credit * rs_studentMark["credit_point"][i];
			 
			 /*是否有实习课程*/
			 if( rs_studentMark["course_name"][i] eq "实习"){
				 
				 hasPrictice = "不合格";
				 if (credit neq 0){
					 hasPrictice = "合格";
				 }
			 }
			 
			 /*是否有论文课程*/
			 if( rs_studentMark["course_name"][i] eq "学士学位论文"){
				 
				 hasPaper = "不合格";
				 if (credit neq 0){
					 hasPaper = "合格";
				 }
			 }
			 
			 if( rs_studentMark["prop_id"][i] eq '1'){
				 
				 courseMust = courseMust + credit;
			 }else{
				 courseSelect = courseSelect + credit;
			 }
			 
			 for( j=1; j le rs_courseType.recordCount; j++ ){
				 
				 if( rs_courseType["name"][j] eq rs_studentMark["course_type"][i]){
					 
					 if(rs_studentMark["prop_id"][i] eq '1'){
						 courseTypeTable[j][1] = courseTypeTable[j][1] + credit;
					 }else{
						 courseTypeTable[j][2] = courseTypeTable[j][2] + credit;
					 }
					 
				 }
				 
			 }
		 }
		 
		 /*又松大学双学位不免修，不计算免修成绩*/
		 if( rs_student.st_id neq '83'){
		 
			 /*课程类别免修学分统计*/
			 for( i=1; i LE rs_hskMark.recordCount ;i++){
				 
				 courseCredit = courseCredit + rs_hskMark["course_credit"][i];
				 
				 creditPoint_t = creditPoint_t + rs_hskMark["course_credit"][i] * rs_hskMark["credit"][i];
				 
				 if( rs_hskMark["prop_id"][i] eq '1'){
					 courseMust = courseMust + rs_hskMark["course_credit"][i];
				 }else{
					 courseSelect = courseSelect + rs_hskMark["course_credit"][i];
				 }
				 
				 for( j=1; j le rs_courseType.recordCount; j++ ){
					 
					 if( rs_courseType["name"][j] eq rs_hskMark["course_type"][i]){
						 
						 if(rs_hskMark["prop_id"][i] eq '1'){
							 courseTypeTable[j][1] = courseTypeTable[j][1] + rs_hskMark["course_credit"][i];
						 }else{
							 courseTypeTable[j][2] = courseTypeTable[j][2] + rs_hskMark["course_credit"][i];
						 }
						 
					 }
					 
				 }
			 }
		 
		 }
		 
		 if( courseCredit neq 0){
			  creditAvgpt = creditPoint_t/courseCredit;
		  }
		 
		 
		 /*检查班级必修课是否修够*/
		 /*韩国又松大学双学位*/
		 if( rs_student.st_id eq '83'){
			 
			 /*查询学生所有班级*/
			 sql = "SELECT a.cls_name, a.grade, a.cls_id FROM t_class a
				  where a.cls_id in (SELECT b.cls_id FROM i_stu_class_info b where b.stu_id = :studentId )";	
			 
			 queryObj = new Query( datasource=application.dnsSlave );
			 
			 queryObj.addParam( name="studentId", value=studentId, cfsqltype="cf_sql_varchar");
			 
			 rs_classes = queryObj.execute( sql=sql ).getResult();
			 
			 
			 result = "";
			 
			 
			 for( i=1; i lte rs_classes.recordCount; i++ ){
				 
				 /*班级课程*/
				 sql = "select b.cid, b.course_name from t_task a 
					    INNER JOIN t_course b on b.cid = a.cid 
					    WHERE b.prop_id = '1' 
					    AND a.term_id = :termId 
					    AND a.task_classes like '%' || :className || '%'";
					    
				 queryObj = new Query( datasource=application.dnsSlave );
			 
				 queryObj.addParam( name="termId", value=right(rs_classes["grade"][i],3), cfsqltype="cf_sql_char");
				 queryObj.addParam( name="className", value=rs_classes["cls_name"][i], cfsqltype="cf_sql_varchar");
				 
				 rs_task = queryObj.execute( sql=sql ).getResult();
				 
				 if(rs_task.recordcount){
					 
					 for( j=1; j lte rs_task.recordCount; j++ ){
						 
						 /*班级课程*/
						 sql = "select mark_result, mark_resit, mark_mode, mark_note, mark_renote 
								 FROM t_student_mark 
								 WHERE stu_id = :studentId AND cid = :courseId";
							    
						 queryObj = new Query( datasource=application.dnsSlave );
					 
						 queryObj.addParam( name="studentId", value=studentId, cfsqltype="cf_sql_varchar");
						 queryObj.addParam( name="courseId", value=rs_task["cid"][j], cfsqltype="cf_sql_varchar");
						 
						 rs_studentMark = queryObj.execute( sql=sql ).getResult();
						 
						 if( rs_studentMark.recordCount){
							 
							 if( max( rs_studentMark.mark_result, rs_studentMark.mark_resit ) lt 60 ){
								 
								 result = result & "|||" & rs_task["course_name"][j] & "(" & markAdvice.getMarkResult(rs_studentMark.mark_mode, rs_studentMark.mark_result, rs_studentMark.mark_note, rs_studentMark.mark_resit, rs_studentMark.mark_renote, '100') & ")";
								 
							 }
							 
						 }else{
							 
							 result = result & "|||" & rs_task["course_name"][j] & "(无)";
							 
						 }
						 
					 }
					 
				 }
			 
			 }
			 
			 
		 }
		
		
		
		
	</cfscript>
</cfsilent>


<div id="headArea">
	<div class="uiHeader uiHeaderWithImage ptm">
		<div class="clearfix uiHeaderTop">
			<div class="uiHeaderActions rfloat">
				<a class="uiButton" href="<cfoutput>#buildURL('studentByPoint', targetArgs)#</cfoutput>"><i class="mrs img btnList"></i><span class="uiButtonText">本科生列表</span></a>
			</div>
			<div>
				<h2 class="uiHeaderTitle">
					<i class="uiHeaderImage img icon16x16 card"></i>本科生详细档案 - <cfoutput>#rs_studentEntity.stu_name#</cfoutput>
				</h2>
			</div>
		</div>
	</div>
</div>

<div class="UIElement">
	<ul class="senateFirstPage">
		<li>
			<div class="clearfix" id="summary">
				<div class="UItab">
					<div class="tabLables">
						<span <cfif currentTab eq "labBasic">class="active"</cfif> id="labBasic" tabTarget="Basic">学籍档案</span>
                              <span <cfif currentTab eq "labSummary">class="active"</cfif> id="labSummary" tabTarget="Summary">学分修读进度</span>
						<span <cfif currentTab eq "labPlan">class="active"</cfif> id="labPlan" tabTarget="Plan">计划课程</span>
                              <span <cfif currentTab eq "labForm">class="active"</cfif> id="labForm" tabTarget="Form">毕业汇总信息</span>
                             <!--- <span <cfif currentTab eq "labCommon">class="active"</cfif> id="labCommon" tabTarget="Common">全校通选课</span>--->
						<span <cfif currentTab eq "labChange">class="active"</cfif> id="labChange" tabTarget="Change">基本信息变更记录</span>
                               <span <cfif currentTab eq "labChange2">class="active"</cfif> id="labChange2" tabTarget="Change2">学籍异动记录</span>
                              <span <cfif currentTab eq "labTeacherLog">class="active"</cfif> id="labTeacherLog" tabTarget="TeacherLog">指导教师记录</span>
					</div>
				</div>
				<script language="javascript" type="text/javascript">
					//<![CDATA[
					<!--
					$(document).ready(function() {
						
						/* init Tab */
						$("div.tabContent").hide();
						$("div#" + $("div.tabLables span.active").attr("tabTarget")).show();
						
						$("div.tabLables > span").click(function(){
							var $targetID = $(this).attr("tabTarget");
							
							$("div.tabLables span").removeClass("active");
							$(this).addClass("active");
							
							$("div.tabContent").not('[id="' + $targetID + '"]').hide();
							$("div.tabContent#" + $targetID).show();
						});
						
					});
					// -->
					//]]>
				</script>
				
				<div id="Basic" class="tabContent">
					<div class="noticeBlock">
						<h3>学籍管理注册信息数据</h3>
						<hr/>
					</div>
					<table class="UItable withBorder">
						<tr>
							<td>学号</td>
							<td colspan="2"><span class="number"><cfoutput>#rs_studentEntity.stu_id#</cfoutput></span></td>
                                   <td>护照号码</td>
							<td colspan="2"><span class="number"><cfoutput>#rs_studentEntity.stu_idcard#</cfoutput></span></td>
							<td style="padding:0;" width="135" height="180" valign="middle" align="center" rowspan="6"><img width="135" height="180" align="middle" src="<cfoutput>#getContextRoot()#</cfoutput>/acadmicRes/assets/student/profile/<cfoutput>#left(rs_studentEntity.stu_id,4)#</cfoutput>/<cfoutput>#rs_studentEntity.stu_id#</cfoutput>.jpg" /></td>
						</tr>
						<tr>
							<td>中文用名</td>
							<td colspan="2"><cfoutput>#rs_studentEntity.stu_name#</cfoutput></td>
                                   <td>护照用名</td>
							<td colspan="2"><cfoutput>#rs_studentEntity.stu_name_english#</cfoutput></td>
						</tr>
                              <tr>
						
							<td>性别</td>
							<td colspan="2"><cfif rs_studentEntity.stu_sex eq "1">男<cfelse>女</cfif></td>
                                   <td>有效期限</td>
							<td colspan="2"><span class="number"><cfoutput>#rs_profileEntity.pt_date#</cfoutput></span></td>
							
						</tr>
						<tr>
							<td colspan="1">出生日期</td>
							<!---<td colspan="2"><span class="number"><cfoutput>#datetimeAdvice.formatDateString(rs_studentEntity.stu_birthday)#</cfoutput></span></td>--->
                                   <td colspan="2"><span class="number"><cfoutput>#rs_studentEntity.stu_birthday#</cfoutput></span></td>
							<td>洲别</td>
							<td colspan="2"><cfoutput>#rs_studentEntity.continent#</cfoutput></td>
						</tr>
						<tr>
							<td>婚姻状况</td>
							<td colspan="2"><cfif rs_profileEntity.is_married eq '1'>
												<cfoutput>已婚</cfoutput>
                                                      	<cfelse>
                                                       	<cfoutput>未婚</cfoutput>
                                                   </cfif></td>
                                   <td>国籍</td>
							<td colspan="2"><cfoutput>#rs_studentEntity.nationality#</cfoutput></td>
						</tr>
                              	<tr>
							<td>职业</td>
							<td colspan="2"><cfoutput>##</cfoutput></td>
                                   <td>经费来源</td>
							<td colspan="2"><cfoutput>#rs_f.f_name#</cfoutput></td>
						</tr>
                              </tr>
                              	<tr>
							<td>来校前学历</td>
							<td colspan="2"><cfoutput>##</cfoutput></td>
                                   <td>是否本科</td>
							<td colspan="5"><cfif rs_profileEntity.is_bachelor EQ '1' >
												<cfoutput>是</cfoutput>
                                                       <cfelse>
                                                       	<cfoutput>否</cfoutput>
                                                   </cfif></td>
						</tr>
                                </tr>
                              	<tr>
							<td>HSK成绩</td>
							<td colspan="2">
								<cfswitch expression="#rs_profileEntity.hsk_score#">
									<cfcase value=""><cfoutput>无</cfoutput></cfcase></td>
                                             <cfcase value="0"><cfoutput>未通过</cfoutput></cfcase></td>
                                             <cfcase value="1"><cfoutput>HSK基础C级（分数等级:1级）</cfoutput></cfcase></td>
                                             <cfcase value="2"><cfoutput>HSK基础B级（分数等级:2级）</cfoutput></cfcase></td>
                                             <cfcase value="3"><cfoutput>HSK基础A级（分数等级:3级）</cfoutput></cfcase></td>
                                             <!---<cfcase value="3"><cfoutput>HSK初等C级（分数等级:3级）</cfoutput></cfcase></td>--->
                                             <cfcase value="4"><cfoutput>HSK初等B级（分数等级:4级）</cfoutput></cfcase></td>
                                             <cfcase value="5"><cfoutput>HSK初等A级（分数等级:5级）</cfoutput></cfcase></td>
                                             <cfcase value="6"><cfoutput>HSK中等C级（分数等级:6级）</cfoutput></cfcase></td>
                                             <cfcase value="7"><cfoutput>HSK中等B级（分数等级:7级）</cfoutput></cfcase></td>
                                             <cfcase value="8"><cfoutput>HSK中等A级（分数等级:8级）</cfoutput></cfcase></td>
                                             <cfcase value="9"><cfoutput>HSK初等C级（分数等级:9级）</cfoutput></cfcase></td>
                                             <cfcase value="10"><cfoutput>HSK初等B级（分数等级:10级）</cfoutput></cfcase></td>
                                             <cfcase value="11"><cfoutput>HSK初等A级（分数等级:11级）</cfoutput></cfcase></td>
                                        </cfswitch>
                                   <td>学生类型</td>
							<td colspan="5"><cfoutput>#rs_st.st_name#</cfoutput></td>
						</tr>
					
						<!---<tr>
							<td>专业名称</td>
							<td colspan="2"><cfoutput>#rs_subjectEntity.sbj_name#</cfoutput></td>
                                   <td>层次</td>
							<td colspan="3"><cfoutput>#dictAdvice.getStudentLevel(rs_subjectEntity.level_code)#</cfoutput></td>
						</tr>--->
					
						<tr>
							<td>入学日期</td>
							<td colspan="2"><span class="number"><cfif rs_profileEntity.date_join eq ""><cfoutput>#datetimeAdvice.formatDateString(rs_classEntity.cls_found & "01")#</cfoutput><cfelse><cfoutput>#rs_profileEntity.date_join#</cfoutput></cfif></span></td>
							<td>学籍状态</td>
							<td colspan="3"><cfoutput>#dictAdvice.getStudentCurrentStatus(rs_profileEntity.status_code)#</cfoutput></td>
						</tr>
                              	<tr>
							<td>个人爱好</td>
							<td colspan="6"><cfoutput>##</cfoutput></td>
						</tr>
					</table>
					<div class="noticeBlock">
						<h3>校内学籍信息数据</h3>
						<hr/>
					</div>
					<table class="UItable withBorder">
						<tr>
							<td>学号</td>
							<td><span class="number"><cfoutput>#rs_studentEntity.stu_id#</cfoutput></span></td>
							<td>姓名</td>
							<td><cfoutput>#rs_studentEntity.stu_name#</cfoutput></td>
							<td>曾用名</td>
							<td><cfif rs_studentEntity.stu_name_used neq "">
									<cfoutput>#rs_studentEntity.stu_name_used#</cfoutput>
									<cfelse>
									-
								</cfif></td>
						</tr>
						<tr>
							<td>行政班</td>
                                   <cfset num_t = 0 />
							<td><cfloop query="classArray">
                                  			<cfset num_t++ />
                                   		<cfif right(classArray.grade, 1) EQ 1 >
                                             		<cfoutput>#left(classArray.grade,4)#--#left(classArray.grade,4)+1#第1学期</cfoutput>-<cfoutput>#classArray.cls_name#</cfoutput>
                                             	<cfelse>
                                                  	<cfoutput>#left(classArray.grade,4)#--#left(classArray.grade,4)+1#第2学期</cfoutput>-<cfoutput>#classArray.cls_name#</cfoutput>
                                             </cfif><br />
                                        </cfloop></td>
							<td>年级</td>
							<td><span class="number"><cfoutput>#rs_classEntity.grade#</cfoutput></span></td>
							<td>预期毕业年份</td>
							<cfif rs_studentEntity.grade_enter neq "" >
								<td><span class="number"><cfoutput>#int((left(rs_studentEntity.grade_enter,4) + rs_subjectEntity.schooling_length)) & right(rs_studentEntity.grade_enter, 1)#</cfoutput></span></td>
                                    <cfelse>
                                    	<td><span class="number">没有班级数据</span></td>
                                    </cfif>
						</tr>
						<tr>
							<td>是否在校</td>
							<td><cfif propAdvice.getInSchool()>是<cfelse><span class="alert">否</span></cfif></td>
							<td>专业</td>
							<td><cfoutput>#rs_subjectEntity.sbj_name#</cfoutput></td>
							<td>专业方向</td>
							<td><cfif rs_studentEntity.sbj_direction eq "0">
									无
									<cfelse>
                                    <cfset sql = "SELECT sbj_name FROM t_subject WHERE sbj_id = :dirId "/>
                                    
                                    <cfset queryObj = new Query( datasource=application.dnsSlave )/>
                                    <cfset queryObj.addParam( name="dirId", value=rs_subjectEntity.sbj_id &rs_studentEntity.sbj_direction, cfsqltype="cf_sql_varchar" )/>
                                    
                                    <cfset rs_direction= queryObj.execute( sql=sql ).getResult()/>
                                    
									<cfif rs_direction.recordCount>
										<cfoutput>#rs_direction.sbj_name#</cfoutput>
									</cfif>
								</cfif></td>
						</tr>
					</table>
                         
                         <div class="noticeBlock">
						<h3>联系方式</h3>
						<hr/>
					</div>
					<table class="UItable withBorder">
						<tr>
							<td colspan="1">电子邮件</td>
							<td><cfoutput>#rs_profileEntity.stu_email#</cfoutput></span></td>
							<td colspan="1">电话号码</td>
							<td><cfoutput>#rs_profileEntity.stu_tel#</cfoutput></td>
						</tr>
                              <tr>
							<td colspan="1">固定住址</td>
							<td colspan="7"><cfoutput>#stringAdvice.HTMLEncode( rs_profileEntity.homeaddr )#</cfoutput></td>
						</tr>
							
						<tr>
							<td colspan="1">在华住址</td>
							<td colspan="7"><cfoutput>#stringAdvice.HTMLEncode( rs_profileEntity.ch_addr )#</cfoutput></td>
						</tr>
					</table>
				</div>
                    
                    <div id="Summary" class="tabContent">
					
					<div class="noticeBlock">
                         	<div class="operation">
                                   <a class="uiButton" target="_blank" href="<cfoutput>#BuildURLToModule('markManager','totalScorePrint', passArgs)#</cfoutput>"><i class="mrs img btn"></i><span class="uiButtonText"><b>查看成绩完整汇总</b></span></a>
                              </div>
						<h3>学分修读情况</h3>
						<p><span class="img icon16x16 message"></span>下面列出的是该学生目前修读课程所获得的各项学分统计和平均学分绩点（<em>这儿含免修课程</em>）</p>
						<hr/>
					</div>
					
					<div class="UICircle clearfix">
						<ul class="boxNavigation">
                                 <cfif rs_student.st_id neq '8' and rs_student.st_id neq '83'>
                                   
                                             <li class="huge"><em><cfoutput>#replace( numberFormat( rs_summary.credit, "_._" ), ".0", "" )#</cfoutput></em><span>总学分</span></li>
                                             <cfif rs_summary.credit_req>
                                                  <li class="large deepblue"><em><cfoutput>#replace( numberFormat( rs_summary.credit_req, "_._" ), ".0", "" )#</cfoutput></em><span>必修课</span></li>
                                             </cfif>
                                             <cfif rs_summary.credit_opt>
                                                  <li class="normal green"><em><cfoutput>#replace( numberFormat( rs_summary.credit_opt, "_._" ), ".0", "" )#</cfoutput></em><span>选修课</span></li>
                                             </cfif>
                                             <cfif rs_student.hsk_score neq "">
                                                  <li class="normal"><em><cfoutput>#replace( numberFormat( rs_student.hsk_score, "_._" ), ".0", "" )#</cfoutput></em><span>HSK</span></li>
                                             </cfif>
                                        
                                        <cfelse>
                                        	
                                              <li class="huge"><em><cfoutput>#replace( numberFormat( courseCredit, "_._" ), ".0", "" )#</cfoutput></em><span>总学分</span></li>
                                             <cfif rs_summary.credit_req>
                                                  <li class="large deepblue"><em><cfoutput>#replace( numberFormat( courseMust, "_._" ), ".0", "" )#</cfoutput></em><span>必修课</span></li>
                                             </cfif>
                                             <cfif rs_summary.credit_opt>
                                                  <li class="normal green"><em><cfoutput>#replace( numberFormat( courseSelect, "_._" ), ".0", "" )#</cfoutput></em><span>选修课</span></li>
                                             </cfif>
                                             <cfif rs_student.hsk_score neq "">
                                                  <li class="normal"><em><cfoutput>#replace( numberFormat( rs_student.hsk_score, "_._" ), ".0", "" )#</cfoutput></em><span>HSK</span></li>
                                             </cfif>
                                        	
                                    </cfif>
						</ul>
					</div>
					
					<div class="UICircle clearfix">
						<ul class="boxNavigation">
							<cfif rs_student.st_id neq '8' and rs_student.st_id neq '83'>
									<cfif rs_summary.credit_avgpt>
                                                  <li class="large red"><em><cfoutput>#numberFormat( rs_summary.credit_avgpt, "_.__" )#</cfoutput></em><span>平均学分绩点</span></li>
                                             </cfif>
                                             
                                        <cfelse>
                                        	  <li class="large red"><em><cfoutput>#numberFormat( creditAvgpt, "_.__" )#</cfoutput></em><span>平均学分绩点</span></li>
                                   </cfif>
						</ul>
					</div>
				</div>
                    
                    <div id="Plan" class="tabContent">
				
					<div class="noticeBlock">
                         	<div class="operation">
                                   <a class="uiButton" target="_blank" href="<cfoutput>#BuildURLToModule('markManager','totalScorePrint', passArgs)#</cfoutput>"><i class="mrs img btn"></i><span class="uiButtonText"><b>查看成绩完整汇总</b></span></a>
                              </div>
						<h3>培养方案课程</h3>
						<p><span class="img icon16x16 message"></span>下面列出的该学生在每个学年修读课程成绩及改门课程所获得的课程绩点</p>
						<hr/>
					</div>
					
					<cfif rs_plan.recordCount eq 0>
						<div class="systemNotice">
							<h3><span class="img icon16x16 info"></span>尚无历史成绩</h3>
							<p>当前还没有修读课程的成绩信息.</p>
						</div>
					</cfif>

					<cfif arrayLen(termYearArray)>
						
						<cfloop array="#termYearArray#" index="termYear">
							<table class="UItable">
								<tr class="cellBorder">
									<td colspan="9">
										<span class="number bold"><cfoutput>#termYear[1]#</cfoutput></span> 学年
										共计 <span class="number bold"><cfoutput>#termYear[2]#</cfoutput></span> 门课程
									</td>
								</tr>
								
								<cfloop array="#termArray#" index="term">
									<cfif term[1] eq termYear[1]>
										
										<cfset termMarkCredit = 0 />
										<cfset termCredit = 0 />
										
										<cfset termMarkCreditReq = 0 />
										<cfset termCreditReq = 0 />

										<tr class="cellBorder">
											<td width="11" rowspan="<cfoutput>#(term[3] + 3)#</cfoutput>"><cfoutput>#dictAdvice.getTermName( term[2] )#</cfoutput></td>
										</tr>
										<tr class="cellBorder">
											<td>课程</td>
											<td align="center" width="80">课程号</td>
											<td align="center" width="40">学分</td>
											<td align="center" width="60">课程性质</td>
											<td align="center" width="60">正考</td>
											<td align="center" width="60">补考</td>
                                                       <td align="center" width="80">成绩绩点</td>
											<td align="center" width="80">课程学分绩点</td>
										</tr>

										<cfloop query="rs_plan">
											
											<cfif term[1] eq rs_plan.academic_year and term[2] eq rs_plan.academic_term >
											
                                                       	<cfset creditPoint = rs_plan.credit_point />
												
                                                            <cfif rs_plan.mark_mode eq '5' >
                                                            	<cfset finalResult = rs_plan.mark_result />
                                                                 <cfset resitResult = rs_plan.mark_resit />
                                                                 <cfif resitResult eq "0">
														<cfset resitResult = "" />
                                                                 </cfif>
                                                            <cfelse>
													<cfset finalResult = markAdvice.getMark( rs_plan.mark_mode, rs_plan.mark_result, rs_plan.mark_note ) />
                                                                 <cfset resitResult = markAdvice.getMarkResit( rs_plan.mark_mode, rs_plan.mark_resit, rs_plan.mark_renote, rs_plan.mark_resit_limit ) />
                                                             </cfif>
												
                                                            
                                                            <cfset credit_t = rs_plan.credit />
                                                            
                                                            <cfif credit_t neq 0 >
          
                                                                 <cfif (stuYear eq '2008' and rs_student.st_id neq '83') or stuYear eq '2012'  >
                                                                           <cfif (rs_plan.course_name eq '汉语阅读-1') or (rs_plan.course_name eq '汉语阅读-2') or (rs_plan.course_name eq '汉语阅读-3') >
                                                                                <cfset credit_t = 4 />
                                                                          </cfif>
                                                                     <cfelse>
                                                                           <cfif rs_plan.course_name eq '汉语阅读-1' >
                                                                              
                                                                               <cfset credit_t = 3 />
                                                                           <cfelseif (rs_plan.course_name eq '汉语阅读-2') OR (rs_plan.course_name eq '汉语阅读-3') >
                                                                               <cfset credit_t = 2 />
                                                                           </cfif>
                                                                </cfif>
                                                                 
                                                            </cfif>
                                                            
                                                            <cfset termMarkCredit = termMarkCredit + creditPoint * credit_t />
												<cfset termCredit = termCredit + credit_t />
												
												<tr class="cellBorder <cfif rs_plan.credit eq 0>alertRow</cfif>">
													<td><cfoutput>#rs_plan.course_name#</cfoutput> <cfif rs_plan.retaking>(重新学习)</cfif></td>
													<td align="center"><span class="number"><cfoutput>#rs_plan.course_code#</cfoutput></span></td>
													<td align="center"><span class="number"><cfoutput>#numberFormat( credit_t, "_._" )#</cfoutput></span></td>
													<td align="center"><cfoutput>#rs_plan.prop_name#</cfoutput></td>
													
											    
													<!---<cfif disableMark AND term[4] eq termId AND NOT arrayFind( complateCourseIds, rs_plan.cid ) >
															<!--- 需要完成评教 才能看本学期成绩 --->
															<td colspan="3" align="center">请完成评教</td>
														<cfelse>--->
															<td align="center"><cfif isNumeric(finalResult)><span class="number"><cfoutput>#finalResult#</cfoutput></span><cfelse><cfoutput>#finalResult#</cfoutput></cfif></td>
															<td align="center"><cfif isNumeric(resitResult)><span class="number"><cfoutput>#resitResult#</cfoutput></span><cfelse><cfoutput>#resitResult#</cfoutput></cfif></td>
                                                                           <td align="center"><span class="number"><cfoutput>#numberFormat( creditPoint, "_.__")#</cfoutput></span></td>
															<td align="center"><span class="number"><cfoutput>#numberFormat(rs_plan.credit_point, "_._") * credit_t#</cfoutput></span></td>
													<!---</cfif>--->
												</tr>
											</cfif>
										</cfloop>
										
										<tr class="cellBorder">
											<td colspan="8" align="right">
												平均学分绩点 <span class="number bold"><cfif termCredit gt 0><cfoutput>#numberFormat( termMarkCredit/termCredit, "_.__")#</cfoutput><cfelse>-/-</cfif></span>
												&nbsp;&nbsp;&nbsp;&nbsp;
												累计学分 <span class="number bold"><cfif termCredit gt 0><cfoutput>#termCredit#</cfoutput><cfelse>-/-</cfif></span>
											</td>
										</tr>
									</cfif>
								</cfloop>
							</table>
						</cfloop>
                              
                               <cfif rs_hskMark.recordCount>
                              
                              
							<table class="UItable">
							
                                        <tr class="cellBorder">
                                              <td colspan="9">
                                                   HSK免修课程 
                                                   共计 <span class="number bold"><cfoutput>#rs_hskMark.recordCount#</cfoutput></span> 门课程
                                              </td>
                                         </tr>
                                         
                                         <tr class="cellBorder">
                                               <td width="11" rowspan="<cfoutput>#rs_hskMark.recordCount+3#</cfoutput>">免修课程</td>
                                          </tr>
                                          
                                          <tr class="cellBorder">
                                               <td>课程</td>
                                               <td align="center" width="80">课程号</td>
                                               <td align="center" width="40">学分</td>
                                               <td align="center" width="60">课程性质</td>
                                               <td align="center" width="60">正考</td>
                                               <td align="center" width="60">补考</td>
                                               <td align="center" width="80">成绩绩点</td>
                                               <td align="center" width="80">课程学分绩点</td>
                                          </tr>
                                          
                                          <cfset termMarkCredit = 0 />
								  <cfset termCredit = 0 />
                                          
                                          <cfloop query="rs_hskMark">
                                          	<tr class="cellBorder">
                                             		<cfset termCredit = termCredit + rs_hskMark.course_credit />
                                                       <cfset termMarkCredit = termMarkCredit + rs_hskMark.credit * rs_hskMark.course_credit />
                                                       
                                                     <td><cfoutput>#rs_hskMark.course_name#</cfoutput> </td>
                                                     <td align="center"><span class="number"><cfoutput>#rs_hskMark.course_code#</cfoutput></span></td>
                                                     <td align="center"><span class="number"><cfoutput>#rs_hskMark.course_credit#</cfoutput></span></td>
                                                     <td align="center"><cfif rs_hskMark.prop_id eq '1'>必修<cfelse>选修</cfif> </td>
                                                     
                                                     <td align="center">免&nbsp;</span></td>
                                                     <td align="center"></td>
                                                     <td align="center"><span class="number"><cfoutput>#numberFormat(rs_hskMark.credit, "_._")#</cfoutput></span></td>
                                                     <td align="center"><span class="number"><cfoutput>#rs_hskMark.credit * rs_hskMark.course_credit#</cfoutput></span></td>
                                                </tr>
                                          </cfloop>
                                          
                                  
                                          <tr class="cellBorder">
                                               <td colspan="8" align="right">
                                                    平均学分绩点 <span class="number bold"><cfif termCredit gt 0><cfoutput>#numberFormat( termMarkCredit/termCredit, "_.__")#</cfoutput><cfelse>-/-</cfif></span>
                                                    &nbsp;&nbsp;&nbsp;&nbsp;
                                                    累计学分 <span class="number bold"><cfif termCredit gt 0><cfoutput>#termCredit#</cfoutput><cfelse>-/-</cfif></span>
                                               </td>
                                          </tr>
                                    </table>
                                    
                                </cfif>
						
					</cfif>
					
				</div>
                    
                    <div id="Common" class="tabContent">
				
					<div class="noticeBlock">
						<h3>全校通选课</h3>
						<hr/>
					</div>
					
					<cfif rs_common.recordCount eq 0>
						<div class="systemNotice">
							<h3><span class="img icon16x16 info"></span>尚无历史成绩</h3>
							<p>当前还没有修读通选课的成绩信息.</p>
						</div>
					</cfif>
					
					<cfif rs_common.recordCount >
						
						<cfset markDone = 0 />
						
						<table class="UItable">
							<tr class="cellBorder">
								<td width="100">学期</td>
								<td>课程</td>
								<td align="center" width="80">课程号</td>
								<td align="center" width="40">学分</td>
								<td align="center" width="60">正考</td>
								<td align="center" width="60">补考</td>
							</tr>
							<cfloop query="rs_common">
								
								<cfif max( rs_common.mark_result, rs_common.mark_resit ) gte 60 >
									<cfset markDone = markDone + rs_common.course_credit />
								</cfif>
								
								<cfset finalResult = markAdvice.getMark( rs_common.mark_mode, rs_common.mark_result, rs_common.mark_note ) />
								<cfset resitResult = markAdvice.getMarkResit( rs_common.mark_mode, rs_common.mark_resit, rs_common.mark_renote, rs_common.mark_resit_limit ) />

								<tr class="cellBorder <cfif max(rs_common.mark_result, rs_common.mark_resit) lt 60>alertRow</cfif>">
									<td><span class="number bold"><cfoutput>#rs_common.academic_year#</cfoutput>-<cfoutput>#rs_common.academic_term#</cfoutput></span></td>
									<td><cfoutput>#rs_common.course_name#</cfoutput></td>
									<td align="center"><span class="number"><cfoutput>#rs_common.course_code#</cfoutput></span></td>
									<td align="center"><span class="number"><cfoutput>#numberFormat( rs_common.course_credit, "_._" )#</cfoutput></span></td>
									<!---<cfif disableMark AND rs_common.term_id eq termId AND NOT arrayFind( complateCourseIds, rs_common.cid ) >
											<!--- 需要完成评教 才能看本学期成绩 --->
											<td colspan="2" align="center">请完成评教</td>
										<cfelse>--->
											<td align="center"><cfif isNumeric(finalResult)><span class="number"><cfoutput>#finalResult#</cfoutput></span><cfelse><cfoutput>#finalResult#</cfoutput></cfif></td>
											<td align="center"><cfif isNumeric(resitResult)><span class="number"><cfoutput>#resitResult#</cfoutput></span><cfelse><cfoutput>#resitResult#</cfoutput></cfif></td>
									<!---</cfif>--->
								</tr>
							</cfloop>
							<tr class="cellBorder">
								<td colspan="6" align="right">已获得学分 <span class="number bold"><cfoutput>#numberFormat(markDone, "_.__")#</cfoutput></span></td>
							</tr>
						</table>
					
					</cfif>

				</div>
				
				<div id="Change" class="tabContent">
					
					<div class="noticeBlock">
                              <h3>基本信息修改记录</h3>
						<hr/>
					</div>
					
					<cfif rs_Login.recordCount>
							<cfset row = 0 />
							<table class="UIEditable">
								<thead>
									<tr>
										<td width="18"></td>
										<td width="60" >修改人</td>
										<td >内容</td>
										<td>时间</td>
									</tr>
								</thead>
								<tbody>
                                         <cfloop query="rs_Login" >
                                               <cfset content = listToArray( rs_Login.log_content, ";" ) />  
                                               
                                               <cfset row++ />
                                               <tr class="editRows">
                                                    <td class="index"><span class="numeric"><cfoutput>#row#</cfoutput></span></td>
                                                    
                                                     <td><cfoutput>#rs_Login.user_name#<br/></cfoutput></td>
                                                   
                                                    
                                                    
                                                    <td><cfoutput>#replace(rs_Login.log_content,";","<br/>","ALL")#</cfoutput></td>
                                                    <td><span class="numeric"><cfoutput>#datetimeAdvice.formatDatetimeString(rs_Login.log_time, 'YYYY-MM-DD HH:MI')#</cfoutput></span></td>
                                                    
                                               </tr>
                                          
                                          </cfloop>
								</tbody>
							</table>
						<cfelse>
							<div class="systemNotice">
								<p>尚无日志记录</p>
							</div>
					</cfif>
					
				</div>
                    
                    <div id="Change2" class="tabContent">
				
					<div class="noticeBlock">
						<h3>学生学籍异动记录</h3>
						<hr/>
					</div>
					
					<cfif rs_history.recordCount>
							<cfset row = 0 />
							<table class="UIEditable">
								<thead>
									<tr>
										<td width="18"></td>
										<td width="90">学号</td>
										<td>姓名</td>
										<td width="60">异动类别</td>
										<td>异动内容</td>
										<td>处理时间</td>
									</tr>
								</thead>
								<tbody>
                                    <cfloop query="rs_history">
									
										<cfset row++ />
										<cfset structInsert(passArgs, "DOCID", rs_history.stuchg_id, true) />
										
										<cfset propAdvice.parseProperty(rs_history.student_prop) />
										
										<tr class="editRows <cfif not propAdvice.getInSchool()>alertRow</cfif>">
											<td class="index"><cfoutput>#row#</cfoutput></td>
											<td><span class="numeric"><cfoutput>#rs_history.stu_id#</cfoutput></span></td>
											<td><cfoutput>#rs_history.stu_name#</cfoutput></td>
											<td><cfoutput>#rs_history.sct_name#</cfoutput></td>
											<td><cfoutput>#rs_history.op_description#</cfoutput></td>
											<td><span class="numeric"><cfoutput>#datetimeAdvice.formatDatetimeString(rs_history.change_date, 'YYYY/MM/DD')#</cfoutput></span></td>
										</tr>
									
									</cfloop>
								</tbody>
							</table>
						<cfelse>
							<div class="systemNotice">
								<p>没有学籍异动历史记录</p>
							</div>
					</cfif>
				</div>
                    
                    <div id="TeacherLog" class="tabContent">
					
                         <div class="noticeBlock">
						<h3>学生学分指导教师变更记录</h3>
						<hr/>
					</div>
					
					<cfif rs_teacherLog.recordCount>
                         
							<cfset row = 0 />
							<table class="UIEditable">
								<thead>
									<tr>
										<td >编号</td>
										<td >操作人</td>
										<td >内容</td>
                                                  <td  >对象</td>
										<td>时间</td>
									</tr>
								</thead>
								<tbody>
                                    	<cfloop query="rs_teacherLog">
                                        
                                            <cfset row++ />
                                            <tr class="editRows">
                                                 <td class="index"><span class="numeric"><cfoutput>#rs_teacherLog.log_id#</cfoutput></span></td>
                                                       
                                                 <td><cfoutput>#rs_teacherLog.userName#</cfoutput></td>
                                                 <td><cfoutput>#rs_teacherLog.log_content#</cfoutput></td>
                                                 
                                                 
                                                 <td><cfoutput>#rs_teacherLog.targetName#</cfoutput></td>
                                                 
                                                 <td><span class="numeric"><cfoutput>#datetimeAdvice.formatDatetimeString(rs_teacherLog.log_time, 'YYYY-MM-DD HH:MI')#</cfoutput></span></td>
                                                
                                                 
                                            </tr>
                                       
                                       </cfloop>
								</tbody>
							</table>
						<cfelse>
							<div class="systemNotice">
								<p>尚无日志记录</p>
							</div>
					</cfif>
                         
                   
				</div>
                    
                    <div id="Form" class="tabContent">
					 <cfset targetArgs = structNew()/>
                          
                          <cfset structInsert(targetArgs,"STU", studentId, true) /> 
                          <div class="noticeBlock">
                          	<div class="operation">
                                   <a class="uiButton" target="_blank" href="<cfoutput>#BuildURLToModule('markManager','totalScorePrint', passArgs)#</cfoutput>"><i class="mrs img btn"></i><span class="uiButtonText"><b>查看成绩完整汇总</b></span></a>
                              </div>
                               <h3>本科生毕业汇总信息</h3>
                              
                          </div>
                          <br/>
                     
                          
                          <form id="formCreate" onSubmit="javascript:return processVerfiyForm('formCreate');" class="formWrapper" method="post" action="<cfoutput>#buildURL('')#</cfoutput>">
                     
                               
                               <div class="label">
                                    <b>学生信息</b>
                                    <input type="text" readonly="readonly" name="stuName" class="typeTextReadOnly" value="姓名：<cfoutput>#rs_student.stu_name#</cfoutput> （<cfoutput>#rs_student.stu_id#</cfoutput>）  -- <cfoutput>#rs_student.name#</cfoutput> " />
                                    <input type="text" readonly="readonly" name="stuName" style="width:550px" class="typeTextReadOnly" value="入学时间：<cfif rs_student.date_join neq ''><cfoutput>#dateJoinContent#</cfoutput><cfelse><cfoutput>#dateJoinContent#</cfoutput> (该生没有设置入学时间，按照该生第一个班级的年级默认计算)</cfif> " />
                               </div>
<hr/>
                               <div class="label">
                                    <b>毕业汇总信息</b>
                                    <input type="text" readonly="readonly" name="stuName" class="typeTextReadOnly" value="总学分： <cfoutput>#courseCredit#</cfoutput> （必修课：<cfoutput>#courseMust#</cfoutput> , 选修课：<cfoutput>#courseSelect#</cfoutput> ）" />
                                    
                                     <input type="text" readonly="readonly" name="stuName" class="typeTextReadOnly" value="毕业论文：<cfoutput>#hasPaper#</cfoutput>" />
                                     <input type="text" readonly="readonly" name="stuName" class="typeTextReadOnly" value="实习课程：<cfoutput>#hasPrictice#</cfoutput>" />
                                     <input type="text" readonly="readonly" name="stuName" class="typeTextReadOnly" value="HSK成绩： <cfswitch expression="#rs_student.hsk_score#">
                                               <cfcase value="">无</cfcase>
                                              <cfcase value="0">未通过</cfcase>
                                              <cfcase value="1">HSK基础C级(分数等级:1级)</cfcase>
                                              <cfcase value="2">HSK基础B级(分数等级:2级)</cfcase>
                                              <cfcase value="3">HSK基础A级(分数等级:3级)</cfcase>
                                              <!---<cfcase value="3">HSK初等C级(分数等级:3级)</cfcase>--->
                                              <cfcase value="4">HSK初等B级(分数等级:4级)</cfcase>
                                              <cfcase value="5">HSK初等A级(分数等级:5级)</cfcase>
                                              <cfcase value="6">HSK中等C级(分数等级:6级)</cfcase>
                                              <cfcase value="7">HSK中等B级(分数等级:7级)</cfcase>
                                              <cfcase value="8">HSK中等A级(分数等级:8级)</cfcase>
                                              <cfcase value="9">HSK高等C级(分数等级:9级)</cfcase>
                                              <cfcase value="10">HSK高等B级(分数等级:10级)</cfcase>
                                              <cfcase value="11">HSK高等A级(分数等级:11级)</cfcase>
                                       </cfswitch>" />
                                    <br/>
                                    
                                    <cfset creditNumTemp = 0/>
                                    <cfset creditMustTemp = 0/>
                                    <cfset creditSelectTemp = 0/>
                                    
                                    
                                    <cfloop from=1 to="#rs_courseType.recordCount#" index="rowIndex">
                                          
                                         <cfset creditNum = courseTypeTable[rowIndex][1] + courseTypeTable[rowIndex][2] />
                                         
                                         <cfset creditNumTemp = creditNumTemp + creditNum />
                                         <cfset creditMustTemp = creditMustTemp + courseTypeTable[rowIndex][1] />
                                         <cfset creditSelectTemp = creditSelectTemp + courseTypeTable[rowIndex][2] />
                                         
                                         <input type="text" readonly="readonly" name="stuName" class="typeTextReadOnly" value="<cfoutput>#rs_courseType["name"][rowIndex]#</cfoutput>：总学分：<cfoutput>#creditNum#</cfoutput>  (必修课：<cfoutput>#courseTypeTable[rowIndex][1]#</cfoutput> , 选修课：<cfoutput>#courseTypeTable[rowIndex][2]#</cfoutput>)" />
                                    </cfloop>
                                    
                                      <!----没有课程类别学分统计--->
                                    <cfset creditNo = courseCredit - creditNumTemp />
                                    <cfset creditMustNo = courseMust - creditMustTemp />
                                    <cfset creditSelectNo = courseSelect - creditSelectTemp />
                                    
                                   <input type="text" readonly="readonly" name="stuName" class="typeTextReadOnly" style="color:#F03" value="无课程类别：总学分：<cfoutput>#creditNo#</cfoutput>  (必修课：<cfoutput>#creditMustNo#</cfoutput> , 选修课：<cfoutput>#creditSelectNo#</cfoutput>)" />
                                    
                                    <cfif rs_courseType.recordCount><br/></cfif>
                                    
                                    <cfif rs_student.st_id eq '83'>
                                    
                                         <cfif result neq "" >
                                              
                                                   <input type="text" readonly="readonly" name="stuName" class="typeTextReadOnly" value="班级必修课不及格课程：(2014-2015学年第1学期及之后成绩统计)" />
                                                   <cfloop list="#result#" index="rowIndex" delimiters="|||">
                                                        <input type="text" readonly="readonly" name="stuName" class="typeTextReadOnly" value="<cfoutput>#rowIndex#</cfoutput>" />
                                                   </cfloop>
                                              
                                              <cfelse>
                                                    <input type="text" readonly="readonly" name="stuName" class="typeTextReadOnly" value="班级必修课已全部及格 (2014-2015学年1学期及之后成绩统计)" />
                                         </cfif>
                                         
                                     </cfif>
                                    
                                    
                               </div>
                               
                               
                               
                          </form>
                     
                     </div>
                    
                    
	
			</div>
		</li>
	</ul>
</div>